import 'package:changxindianzishangwu/cache/local_cache.dart';
import 'package:changxindianzishangwu/http/base/ec_base_request.dart';
import 'package:changxindianzishangwu/http/request/tencen_new_friends_request.dart';
import 'package:changxindianzishangwu/http/request/txnew_friend_request.dart';
import 'package:changxindianzishangwu/http/zd_net.dart';
import 'package:changxindianzishangwu/model/friend_applist.dart';

class TencenNewFirendsDao {
  static addInfo(String content, String createTime, String modifyTime,
      String status, String toUserId, String userId) async {
    EcBaseRequest request = new TXnewFriendsRequest();
    request
        .add('content', content)
        .add('createTime', createTime)
        .add('modifyTime', modifyTime)
        .add('status', status)
        .add('toUserId', toUserId)
        .add('userId', userId)
        .add('access_token', getAppLoginToken());
    var variableName = await ZdNet.getInstance().send(request);
    print("======================" + variableName.toString());
  }

  static getFriednsApplist(String userId) async {
    EcBaseRequest request = new TencenNewFriendsRequest();
    request.add('userId', userId).add('access_token', getAppLoginToken());
    var variableName = await ZdNet.getInstance().send(request);
    FriendApplist friendApplist = FriendApplist.fromJson(variableName);
    return friendApplist;
    print("======================list::::::;;" + variableName.toString());
  }
}
